package com.example.model.jdao;

import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.example.pojo.Ganta;


public interface GanTaDao extends CrudRepository<Ganta, Integer>{
	@Modifying
	@Query("update Ganta set xlld=:xlld where gid=:gid")
	public void updateGantaXlld(@Param("xlld")String xlld,@Param("gid")int gid);
	
	@Modifying
	@Query("update Ganta set gantaisqy=:is where xlld=(select xlld from Xianlu where id=:id)")
	public void updateIsqy(@Param("is")int is,@Param("id")int id);
	
	@Modifying
	@Query("update Ganta set gantaisqy=:is where gid=:gid")
	public void updategtIsqy(@Param("is")int is,@Param("gid")int gid);
	
	@Modifying
	@Query("update Ganta set gantatype=:type where gid=:gid")
	public void updategtType(@Param("type")String type,@Param("gid")int gid);
}
